<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<HTML>
	<HEAD>
		<TITLE>编辑个人信息</TITLE>
		<LINK href="<%=request.getContextPath()%>/jsp/manage/css/style.css" type=text/css rel=stylesheet>
	</HEAD>
	<script type="text/javascript">
	function CheckForm(){
		var str;
		str=document.myform.name.value.replace(/\s+/g, '');
		if (str==''){
		   alert('姓名不能为空！');
		   document.myform.name.focus();
		   return false;
		}
		str=document.myform.password.value.replace(/\s+/g, '');
		if (str==''){
		   alert('密码不能为空！');
		   document.myform.password.focus();
		   return false;
		}
		str=document.myform.email.value.replace(/\s+/g, '');
		if (str==''){
		   alert('EMail不能为空！');
		   document.myform.email.focus();
		   return false;
		}else{
		    if(document.myform.email.value.indexOf("@")==-1||document.myform.email.value.indexOf(".")==-1)
		    {
		       window.alert("请输入正确的E-mail地址！")
		       document.myform.email.focus();
		       return false;
		    }
		 }
		return true;  
	}
	function checkPWD(input)
	{
	        var checkOK = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_";
	        var checkStr = input;
	        for (i=0;i < checkStr.length;i++)
	        {
	                ch = checkStr.charAt(i);
	
	                for (j = 0;  j < checkOK.length;  j++)
	                        if (ch == checkOK.charAt(j))
	                                break;
	            if (j == checkOK.length)
	                  {
	                        return 0;
	                        break;
	                }
	        }
	        return 1;
	 }
	</script>
	<BODY topMargin="0" marginheight="0" marginwidth="0">

		<FORM name="myform" onsubmit="return CheckForm();" method="post" target="_self"
			action="<%=request.getContextPath()%>/userManage.do?method=usereditsave&id=${user.id}">
			<TABLE class="border" cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
				<TBODY>
					<TR class="topbg">
						<TD height=22 colSpan=2 align=middle><STRONG>编辑个人信息</STRONG><br></TD>
					</TR>
					<TR align=middle>
						<TD>
							<TABLE cellSpacing=1 cellPadding=2 width="100%" border=0>
								<TBODY>
									<TR class=tdbg>
										<TD align=right width=9%>
											&nbsp;
										</TD>
										<TD colspan="10">
											<FONT color=#ff0000>
												<STRONG>注意<font color="#0000ff">*的内容必须填</font> </STRONG> 
											</FONT>
										</TD>
									</TR>
									<TR class=tdbg>
										<TD align=right width=120>
											<STRONG>姓名：</STRONG>
										</TD>
										<TD colSpan=2>
											<input id="name" maxlength=255 size=50 name="name"  value=${user.name} >
										</TD>
									</TR>
									<TR class=tdbg>
										<TD align=right width=120>
											<STRONG>E-Mail：</STRONG>
										</TD>
										<TD colSpan=2>
											<input id='email' maxlength=255 size=50 name='email'  value=${user.email} >
											<FONT color=#ff0000>*</FONT>
										</TD>
									</TR>
								</TBODY>
							</TABLE>
						</TD>
					</TR>
					<tr align="center">
						<td colspan="2">
							<INPUT id="Save" style="CURSOR: hand" type="submit" value="添加" name="Save">
							<INPUT id="Cancel" style="CURSOR: hand" type="reset" value="取消" name="Cancel" 
								onclick="window.location.reload('<%=request.getContextPath()%>/userManage.do?method=userview') " >
						</td>
					</tr>
				</TBODY>
			</TABLE>
			<BR>
		</FORM>
	</BODY>
</HTML>
